// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * CatalogProductIndexWebsite generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_index_website", catalog = "magento")
public class CatalogProductIndexWebsite implements java.io.Serializable {

	private short websiteId;
	private CoreWebsite coreWebsite;
	private Date websiteDate;
	private Float rate;

	public CatalogProductIndexWebsite() {
	}

	public CatalogProductIndexWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	public CatalogProductIndexWebsite(CoreWebsite coreWebsite,
			Date websiteDate, Float rate) {
		this.coreWebsite = coreWebsite;
		this.websiteDate = websiteDate;
		this.rate = rate;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "coreWebsite"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "website_id", unique = true, nullable = false)
	public short getWebsiteId() {
		return this.websiteId;
	}

	public void setWebsiteId(short websiteId) {
		this.websiteId = websiteId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public CoreWebsite getCoreWebsite() {
		return this.coreWebsite;
	}

	public void setCoreWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "website_date", length = 10)
	public Date getWebsiteDate() {
		return this.websiteDate;
	}

	public void setWebsiteDate(Date websiteDate) {
		this.websiteDate = websiteDate;
	}

	@Column(name = "rate", precision = 12, scale = 0)
	public Float getRate() {
		return this.rate;
	}

	public void setRate(Float rate) {
		this.rate = rate;
	}

}
